import moment from 'moment';

export const searchProps = [
  {
    type: 'select_input_one',
    value: 'channelId',
    name: '渠道',
    selectOptions: [],
    placeholder: '请选择',
    style: {
      width: '180px',
    },
  },
  {
    type: 'date3',
    value: 'time',
    name: '日期',
    selectOptions: [],
    placeholder: '请选择',
    style: {
      width: '240px',
    },
  },
];

export const columns = [
  // {
  //   title: '序号',
  //   dataIndex: 'index',
  //   width: 70,
  //   customRender: (text, record, index) => `${index + 1}`,
  // },
  
  
  
  {
    dataIndex: 'channelName',
    title: '渠道名字',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'cost',
    title: '渠道成本',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'collisionSuccessNum',
    title: '撞库成功量',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'apiApplyNum',
    title: '进件成功数量',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  // {
  //   dataIndex: 'collisionNum',
  //   title: '撞库量',
  //   ellipsis: true,
  //   width: 150,
  //   customRender: (text) => text || '/',
  // },
  {
    dataIndex: 'h5ClickNum',
    title: '产品唯一访问量',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'insuranceApplyNum',
    title: '机构进件数量',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'insuranceNatureApplyNum',
    title: '机构自然进件数量',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'statisticsDate',
    title: '统计时间',
    ellipsis: true,
    width: 180,
    customRender: (text) => (text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '/'),
  },
  {
    dataIndex: 'action',
    title: '接入权限',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'channelCode',
    title: '渠道标识',
    ellipsis: true,
    width: 100,
    customRender: (text) => text || '/',
  },
  // {
  //   dataIndex: 'returnNumber',
  //   title: '回调数量',
  //   ellipsis: true,
  //   width: 150,
  //   customRender: (text) => text || '/',
  // },
];
